Detection of a discrete positional relationship between a magnetic field generator and a magnetic field sensor arrangement

ABSTRACT

By a relative movement between an arrangement of at least three magnetic field sensors and a magnetic field generator, different discrete positional relationships can be produced between the same. A first signal is calculated as a first linear combination using at least two of three sensor signals. It is checked whether the first signal uniquely indicates one of the different discrete positional relationships. If yes, it is determined that the arrangement is located in the one discrete positional relationship. If no, a second signal is calculated as a second linear combination using at least two of the three sensor signals, at least one of which differs from the sensor signals used in the calculation of the first signal, and at least the second signal is used to determine in which of the different discrete positional relationships the arrangement is located relative to the magnetic field generator.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.16/902,724 filed Jun. 16, 2020, which claims the benefit of GermanPatent Application No. 102019209035.4 filed Jun. 21, 2019, which areincorporated by reference as if fully set forth.

FIELD

The present disclosure relates to devices and methods for detecting apositional relation-ship between a magnetic field generator and amagnetic field sensor arrangement which comprises at least threemagnetic field sensors. In particular, the present disclosure deals withsuch devices and methods that allow the determination of which of amultiplicity of discrete positional relationships the magnetic fieldsensor arrangement is located in.

BACKGROUND

Magnetic field sensors are used to measure magnetic fields. Examples ofmagnetic field sensors are Hall sensor devices, which deliver an outputsignal that is proportional to an applied magnetic field. Other examplesof magnetic field sensors are sensors based on a magnetoresistiveeffect, such as AMR sensors (AMR=anisotropic magnetoresistive effect),GMR sensors (GMR=giant magnetoresistive effect), CMR sensors(CMR)=colossal magnetoresistive effect, or TMR sensors(TMR=magnetoresistive tunnel effect).

For safety-relevant applications, such as detecting the position of agear lever, two independent sensors can be used, for example twodiscrete sensors which are arranged on a common carrier, or two sensorchips in the same housing. Such sensors are used for redundancypurposes, for example, to detect a failure of one of the sensors or tobe able to fully or partially compensate for the same in combinationwith other indicators, such as self-test results. Such redundant sensorsgenerally provide no stray field suppression, however, since they do notmeasure differentially.

In addition to these kinds of redundant sensors, special configurations,setups of sensors can be used in conjunction with specific magneticcircuits which are designed to generate local differential magneticfields. Such special configurations can enable a stray fieldsuppression. For example, such arrangements can be incremental speedsensors with an adjusted distance between Hall probes and magnet-wheelpitch.

SUMMARY

It would be desirable to have devices and methods that enable a simpleand reliable detection of the discrete positional relationship from amultiplicity of discrete position relationships in which a magneticfield sensor arrangement and a magnetic field generator are located, andby the same means to bring about a reduction in the interference fieldsensitivity.

Examples of the present disclosure create device for detecting apositional relationship between a magnetic field generator and anarrangement of at least three magnetic field sensors, wherein by meansof a relative movement between the arrangement and the magnetic fieldgenerator, different discrete positional relationships can be generatedbetween the arrangement and the magnetic field generator, the at leastthree magnetic field sensors being configured to generate at least threesensor signals in response to a magnetic field generated by the magneticfield generator, and the device having a processing device which isconfigured to: calculate a first signal as a first linear combinationusing at least two of the three sensor signals; to check whether thefirst signal uniquely indicates one of the various discrete positionalrelationships; if the first signal uniquely indicates one of the variousdiscrete positional relationships, to determine that the arrangement islocated in the one discrete positional relation-ship relative to themagnetic field sensor; and if the first signal does not uniquelyindicate one of the various discrete positional relationships, tocalculate a second signal as a second linear combination using at leasttwo of the three sensor signals, at least one of which differs from thesensor signals used in the calculation of the first signal, and to useat least the second signal in order to determine in which of thedifferent discrete positional relationships the arrangement is locatedrelative to the magnetic field generator. The linear combinations of thesensor signal are preferably configured in such a way that they exhibita reduced sensitivity relative to stray fields in comparison to themagnetic field of the magnetic field generator.

Examples of the present disclosure create methods for detecting apositional relationship between a magnetic field generator and anarrangement of at least three magnetic field sensors, wherein by meansof a relative movement between the arrangement and the magnetic fieldgenerator, different discrete positional relationships can be generatedbetween the arrangement and the magnetic field generator, the at leastthree magnetic field sensors being configured to generate at least threesensor signals in response to a magnetic field generated by the magneticfield generator, having the following features:

-   -   calculating a first signal as a first linear combination using        at least two of the three sensor signals,    -   checking whether the first signal uniquely indicates one of the        various discrete positional relationships,    -   if the first signal uniquely indicates one of the different        discrete positional relationships, determining that the        arrangement is located in the one discrete positional        relationship to the magnetic field sensor,    -   if the first signal does not uniquely indicate one of the        various discrete positional relationships, calculating a second        signal as a second linear combination using at least two of the        three sensor signals, at least one of which differs from the        sensor signals used in the calculation of the first signal, and        using at least the second signal in order to determine in which        of the different discrete positional relationships the        arrangement is located relative to the magnetic field generator.

Examples of this disclosure exploit the fact that by using a firstlinear combination, it may be possible to determine the discretepositional relationship in which the magnetic field generator andmagnetic field sensor arrangement are located. If the first linearcombination does not uniquely allow such a determination, then at leastone second linear combination is calculated in order to be used in thedetermination. Examples of the present disclosure thus allow this to bedetermined with reduced effort, since if a first linear combinationwhich may be insensitive to stray fields and stray field gradientsallows a unique determination, other linear combinations do not need tobe calculated. Other sensor signals or linear combinations can be used,however, to carry out a plausibility check.

BRIEF DESCRIPTION OF THE DRAWINGS

Examples of the disclosure are described with reference to the attacheddrawings. In the drawings:

FIG. 1 shows a schematic drawing of a system that has a device inaccordance with one example of the present disclosure;

FIG. 2 shows a flow diagram of a method in accordance with one exampleof the present disclosure;

FIG. 3 and FIG. 4 show schematic drawings illustrating the positionalrelationships between a magnet and magnetic field sensors, which arehelpful in explaining the present disclosure;

FIG. 5 shows a schematic drawing illustrating the positionalrelationship between a magnetic field arrangement and a magnet inaccordance with an example of the present disclosure;

FIG. 6 shows a schematic representation of a system illustrating adevice in accordance with examples, which uses signals from 3D sensorunits;

FIG. 7 shows a schematic representation of a system illustrating adevice in accordance with examples, which uses signals from 3D sensorunits in which at least one sensor is turned through an offset angle;

FIG. 8, FIG. 9 and FIG. 10 show schematic drawings which illustrate thedifferent positional relationships between an arrangement with fourmagnetic field sensors and a magnetic field, in accordance with oneexample of the present disclosure.

DETAILED DESCRIPTION

In the following, examples of the present disclosure are described indetail using the attached drawings. It should be noted that identicalelements or elements that have the same functionality can be labelledwith identical or similar reference signs, and a repeated description ofelements that are labelled with the same or similar reference signs istypically omitted. Descriptions of elements that have the same orsimilar reference signs are interchangeable. In the followingdescription, many details are described in order to provide a morein-depth explanation of examples of the disclosure. However, it isobvious to persons skilled in the art that other examples can beimplemented without these specific details. Features of the differentexamples described can be combined with one another, unless the featuresof a corresponding combination mutually exclude each other or such acombination is explicitly excluded.

FIG. 1 shows a schematic diagram of a system with a magnetic fieldgenerator 10, a magnetic field sensor arrangement 12 and a device 14 fordetermining a positional relationship between magnetic field 10 andmagnetic field sensor arrangement 12. The device 14 has a processingcircuit 15. Examples of the present disclosure relate to the device 14with the processing circuit 15 without the magnetic field sensorarrangement 12 and the magnetic field generator 10. Examples of thepresent disclosure relate to a device or system, which is or are formedby a combination of the processing device 15 and the magnetic fieldsensor arrangement 12. Examples of the present disclosure relate to adevice or a system, which is or are formed by a combination of theprocessing device 15, the magnetic field sensor arrangement 12 and themagnetic field generator 10.

The magnetic field sensor arrangement 12 has at least three magneticfield sensors 16, 18, 20. The magnetic field sensors 16, 18, 20 can beformed by any suitable sensor elements, such as, for example, Hallsensors or sensors based on a magnetoresistive effect, such as AMRsensors, GMR sensors, CMR sensors or TMR sensors. Each magnetic fieldsensor outputs a sensor signal to the device 14. In examples, eachmagnetic field sensor outputs a sensor signal which indicates a magneticfield component in one direction, such as B_(x), B_(y), or B_(z).

In general, the magnetic field sensors of the magnetic field sensorarrangement have a stationary positional relationship to one another andcan be arranged on a common carrier, for example, in a common housing oron the same chip.

The magnetic field sensor arrangement 12 is movable relative to themagnetic field generator 10. This allows different discrete positionalrelationships to be created between the arrangement 12 and the magneticfield generator 10. In FIG. 1, the magnetic field sensor arrangement 12and the magnetic field generator 10 are shown in a first positionalrelationship Pos1. In addition, the magnetic field sensor is shown indashed lines in a second positional relationship Pos2 and in a thirdpositional relationship Pos3. In each of the positional relationshipsthe magnetic field sensor arrangement 12 is arranged differently withrespect to the magnetic field generated by the magnetic field generator,so that each positional relationship can be assigned a magnetic fieldregion of a magnetic field in at least one direction. The at least threemagnetic field sensors 16, 18, 20 are configured to generate at leastthree sensor signals S1, S2, S3 in response to the magnetic fieldgenerated by the magnetic field generator 10.

The device 14 receives the at least three sensor signals S1, S2, S3 andthe processing device 15 calculates a first signal as a first linearcombination using at least two of the three sensor signals S1, S2, S3.The processing device 15 also checks whether the first signal uniquelyindicates one of the different discrete positional relationships Pos1,Pos2 or Pos3, for example the positional relationship Pos1 shown inFIG. 1. If the first signal uniquely indicates one of the differentdiscrete positional relationships, such as Pos1, the processing circuit15 verifies that the arrangement 12 is located in this discretepositional relationship to the magnetic field generator 10. Furthercalculations are not required in this case. If the first signal does notuniquely indicate one of the different discrete positionalrelationships, the processing circuit 15 calculates a second signal as asecond linear combination using at least two of the three sensor signalsS1, S2, S3, at least one of which differs from the sensor signals usedin the calculation of the first signal, and uses at least the secondsignal in order to determine in which of the different discretepositional relationships the arrangement 12 is located relative to themagnetic field generator 10.

In some examples, the device 14 is thus configured to carry out a methodas is shown in FIG. 2. At 30 the first signal is calculated as a firstlinear combination using at least two of the three sensor signals. At 32it is checked whether the first signal uniquely indicates one of thedifferent discrete positional relationships. If the result of the checkat 32 is yes, at 34 it is determined that the arrangement is located inthe discrete positional relationship to the magnetic field sensor. Ifthe result of the check at 32 is no, at 36 a second signal is calculatedas a second linear combination using at least two of the three sensorsignals, at least one of which differs from the sensor signals used inthe calculation of the first signal. At least the second signal is usedto determine in which of the different discrete positional relationshipsthe arrangement is located relative to the magnetic field generator.

In some examples, for example n discrete positional relationships canexist, where n is an integer greater than two. In some examples, thefirst linear combination can be designed to allow a unique determinationof all n discrete positional relationships when there is no stray fieldpresent. In other examples, the first linear combination can be designedto produce a unique determination if one of a first subset of the ndiscrete positional relationship exists, and not to produce a uniquedetermination if a positional relationship exists which does not belongto the first subset. The second linear combination can be designed so asto produce a unique determination if a positional relationship existswhich belongs to a second subset of the n positional relationships whichcontains different positional relationships from the first subset. Thefirst and the second subset can include all n discrete positionalrelationships. In other examples, the first and the second subset do notcontain all n discrete positional relationships, but at least oneadditional subset that contains one or more positional relationshipswhich can be uniquely identified by one or more additional linearcombinations. In such examples the processing device can be designed tocalculate one or more linear combinations if the first and second linearcombination do not allow a unique determination.

In some examples, the magnetic field sensors are sensitive in a specificdirection. In some examples therefore, the magnetic field sensors aresimple linear magnetic field sensors. In some examples, the magneticfield sensors are part of 1D sensor units, 2D sensor units or 3D sensorunits. A 1D sensor unit has a magnetic field sensor which is sensitivein one direction in order to detect a first magnetic field component,e.g. B_(x), B_(y) or B_(z). A 2D sensor unit has two magnetic fieldsensors which are sensitive in different directions, in order to detecta first and a second magnetic field component. A 3D sensor unit hasthree magnetic field sensors which are sensitive in three differentdirections, in order to detect three magnetic field components, e.g.B_(x), B_(y) and B_(z).

In some examples, the magnetic field sensors 16, 18, 20 can be sensitivein the same direction, so that the sensor signals S1, S2, S3 indicatemagnetic field components in the same direction. In some examples, thethree magnetic field sensors 16, 18, 20 can be arranged side by side,wherein a second magnetic field sensor 18 of the three magnetic fieldsensors 16, 18, 20 is arranged between a first magnetic field sensor 16and a third magnetic field sensor of the three magnetic field sensors16, 18, 20. In examples, the processing circuit 15 can be designed tocalculate the first signal in accordance with S1−2*S2+S3, and the secondsignal as a difference between the sensor signals S1 and S2, as adifference between the sensor signals S2 and S3, or as a differencebetween the sensor signals S1 and S3.

Examples of the present disclosure are not limited to a number of threemagnetic field sensors. In some examples, the magnetic field sensorarrangement 12 can have heterogeneous combinations of magnetic fieldsensors in order to prevent systematic multiple failures. A plurality ofarrangements can be used at different positions, which can be housed asdiscrete elements or can be installed in the same housing or on the samechip.

Magnetic field sensors of the magnetic field sensor arrangement whichare designed to detect magnetic fields in different directions can bearranged at essentially the same position. Magnetic field sensors of themagnetic field sensor arrangement which are designed to detect magneticfields in the same direction are arranged at a sufficient distance fromone another in order to be placed in the magnetic field in such a waythat the magnetic field produces a sufficient difference to be able toidentify discrete positions and to be able to achieve a stray fieldcompensation.

In some examples the magnetic field generator is designed to produce amagnetic field in as simple a way as possible. In examples, the magneticfield sensor can be a bar magnet with only two poles or a magnetic disc.Thus, the magnetic field sensor can be implemented cost-effectively. Themagnetic field sensor can be mounted on a moving part, the position ofwhich is to be detected. In some examples, therefore, no complexmagnetic circuit needs to be discarded in order to deliver a real,differential magnetic field.

Each discrete position, i.e. positional relationship, can be assigned amagnetic field region, wherein for at least one direction component thedifference of the sensor signals of two spaced apart magnetic fieldsensors can be used. The observable influence of stray fields which aregenerated by a stray field source at a distance that is greater than thedistance from the magnetic field generator, can be significantly reducedin this direction. Compared with magnetic circuits which are optimizedfor generating differential fields, the stray field cancellation is notperfect, which can be compensated for by a combination of differentmeasurements. In some examples of the present disclosure therefore, oneor more other linear combinations of sensor signals can be used, if afirst calculated linear combination does not allow a uniquedetermination.

In some examples of the present disclosure the processing device isdesigned to calculate the first linear combination using sensor signalsof the at least three sensor signals which among all of the at leastthree sensor signals are the least sensitive to a particular strayfield. In some examples, the positions of the magnetic field sensors andthe combination of the measurements, i.e. the calculations of the firstlinear combination, the second linear combination and further possiblelinear combinations, can be selected in such a way that the positions,i.e., positional relations, which are detectable by means of the minimumsignal differences can be detected by measurements with the best strayfield suppression. For additional measurements which distinguish theother positions by greater magnetic field changes, measurements withhigher stray field sensitivity can also be used.

In some examples of the present disclosure the magnetic field sensorarrangement is configured, i.e. the magnetic field sensors are placed,so as to provide significantly different signals for different discretepositional relationships that are to be detected. In such examples, themagnetic field sensors are arranged at appropriate distances from eachother. This is true at least for the direction in which a stray field ofa critical size is expected. The magnetic field sensors can be keptsufficiently close to each other to prevent gradients produced by strayfields from entering an area which affects the position detection. Insome examples, the magnetic field measurements, i.e. the sensor signals,from each magnetic field sensor can be detected independently anddifferences between the signals of different sensor positions can becalculated (as linear combinations). The actual position can beclassified based on a first calculated difference. If the firstcalculated difference does not uniquely identify the position, i.e. thepositional relationship, one or more further differences can becalculated and used in order to distinguish positions which cannot beunambiguously identified based on the setup with the best stray fieldinsensitivity. In some examples, additional cross-checks can beperformed by using additional measurements or using sensor signals thatrepresent other direction components of the magnetic field.

In some examples of the present disclosure, the three sensor signals canoriginate from a 3D sensor unit that has three magnetic field sensorswhich are designed to detect magnetic field components in differentdirections.

In some examples of the disclosure, the magnetic field sensorarrangement can have 1D, 2D or 3D sensor units that are spaced apartfrom each other, such that linear combinations, such as differencesignals, of respective magnetic field sensors of the sensor units thatdetect magnetic field components in the same direction can be formed.Depending on the complexity of a position detection problem, 1D, 2D or3D sensor units can be used.

In some examples, in addition to the linear combinations of the magneticfield sensors required for determining the position, other linearcombinations can be used, which can be used for plausibility checking toimprove the functional safety of the arrangement.

Referring to FIG. 3, a simple detection problem is described. This caseinvolves the rotation of a permanent bar magnet 40, which represents amagnetic field generator, about its center which lies on a vertical axisA. The bar magnet 40 has a single north pole N and a single south poleS. Field lines of the magnetic field generated by the magnet 40 areshown in FIG. 3 (and FIGS. 4 and 5).

FIG. 3 shows three positional relationships Pos1, Pos2 and Pos3 of thepermanent magnet 40 relative to a sensor unit 42. For example, themagnet 40 can be mounted on a movable lever, such as a gear shift. Thegear shift and hence the magnet 40 can be positioned at the threediscrete positions, which are shown in FIG. 3. In a non-safety-relevantapplication, the discrete position could be determined using a singlesensor which detects the horizontal magnetic field component. The sensorcould classify the position as follows:

-   Pos1: horizontal field points to the left-   Pos2: horizontal field is close to 0-   Pos3: horizontal field points to the right

For the setup shown, the vertical magnetic field component cannot beused because the measurement results from Pos1 and Pos3 are both closeto 0 and would therefore be ambiguous.

For applications that are safety-relevant, the sensor unit 42 could bedoubled and the consistency of both measurements could be compared inorder to determine whether an inconsistency exists. For a positionsensing task with higher complexity, for example, the detection of theposition of a gear shift, 2D or 3D magnetic field sensor units can beused and criteria can be defined for each dimension, for example, eachmagnetic field component B_(x), B_(y) and B_(z), to obtain a betterdifferentiation between multiple positions which are to be detected.Unfortunately, the detection may be distorted by an overlaid strayfield, which in the worst case can be strong enough to turn themeasurement by each sensor unit in a specific direction, for example ahorizontal direction, which would always give rise to the same positiondetection regardless of the orientation of the magnet.

FIG. 4 shows a magnetic sensor arrangement which has two sensor units 44and 46 that are spaced apart from each other. The magnet 40 ispositioned in three positional relationships Pos1, Pos2 and Pos3relative to the magnetic sensor in turn. As is apparent in positionPos2, the two sensor units 44 and 46 are arranged on opposite sides ofthe vertical axis A when the magnet is arranged in its central position(Pos2) with respect to the sensor units 44 and 46.

The sensor units 44, 46 can be, for example, 2D sensor units or 3Dsensor units, which have magnetic field sensors that are capable ofdetecting a horizontal magnetic field component B_(x) (x-direction) anda vertical magnetic field component B_(y) (y-direction). The use of thedifference between the output signals from magnetic field sensors of thesensor units 44, 46, which each detect equal magnetic field components,can be used to reduce a stray field distortion to the stray fieldgradient over the distance between the two magnetic field sensors. Thisrepresents a significant improvement over a case in which no stray fieldcompensation takes place.

Considering the vertical magnetic field components in the example shownin FIG. 4, forming a difference between the sensor signal of themagnetic field sensor of the left-hand sensor unit 44 and the sensorsignal of the magnetic field sensor of the right-hand sensor unit 46yields the following results:

-   Pos1: (high vertical field)−(low vertical field)→positive difference-   Pos2: (medium vertical field)−(medium vertical field)→difference    close to 0-   Pos3: (low vertical field)−(high vertical field)→negative difference

The difference calculation represents a linear combination of the sensorsignals of the left-hand sensor unit 44 and the right-hand sensor unit46. A discrete positional relationship can be assigned to each of theresults, wherein a positive difference uniquely indicates the positionPos1, a difference which is close to zero uniquely indicates theposition Pos2, and a difference which is negative uniquely indicates theposition Pos3.

For the setup shown in FIG. 4, the horizontal field components(x-direction) are not usable, because forming the difference of themeasurements for the positions Pos1 and Pos3 would produce essentiallyidentical results, so that due to the ambiguity, a unique assignment toone of the discrete positions would not be possible. The measurement ofthe horizontal field components could still be used, however, to verifythat the magnet 40 is located in the position Pos2, since the differencefor position Pos2 differs unambiguously from the differences of thepositions Pos1 and Pos3. Thus, this difference obtained using thehorizontal field components can provide a redundancy and be used as aplausibility check for determining the position Pos2 which was obtainedusing the vertical field components. Alternatively, preferably inparticular, if lower stray fields are to be expected in the horizontaldirection than in the vertical direction, the difference between thehorizontal field components can be calculated first, which gives rise toa unique result when the magnet is located in position P2. If the magnetis not located in position P2 this calculation does not provide a uniqueresult and the difference between the vertical field components iscalculated in order to determine the discrete position uniquely. In thiscase the tolerable signal-to-noise ratio is higher than for verticalstray fields, since the position P2 has already been excluded by themeasurement of the horizontal field difference.

FIG. 6 shows an example of a processing device 15, which receives sensorsignals 50 from a first sensor unit 52 and sensor signals 54 from asecond sensor unit 56. In the example shown, the sensor units 52 are 3Dsensor units which detect sensor signals x, y, and z, the respectivemagnetic field components in the x-direction, y-direction andz-direction. The sensor signals 50 and 54 therefore each have 3 sensorsignals x, y, and z. In some examples, the x-direction, the y-directionand the z-direction can be perpendicular to each other and correspond tothe three directions of a Cartesian coordinate system. The processingdevice 15, which can be designed, for example, as a microcontroller, μC,receives the sensor signals 50 and 54 from which it calculatesrespective difference signals Δx, Δy and Δz. The processing device 15uses the sensor signals x, y, z, and/or the difference signals Δx, Δyand Δz, in order to classify the sensor signals and/or the differencesignals to use them as a basis for determining the discrete positionalrelationship between the magnetic field sensor arrangement, whichcomprises the sensor units 52 and 54, and a magnetic field sensor (notshown in FIG. 6) and to output a position signal 58 that indicates theposition. The processing device may also use one or more of the sensorsignals x, y, z, and/or the difference signals Δx, Δy and Δz to performan error detection, and based thereon to output a diagnostic signal 59,which can indicate, for example, that a sensor unit or a magnetic fieldsensor is not working properly.

In order to diversify the classification, in some examples the sensorunits can be offset with respect to one another about one, two or threeaxes by an offset angle. The magnetic field sensors of the mutuallyoffset sensor units then no longer detect magnetic field components inthe same direction, but magnetic field components that are arrangedrelative to one another at an angle corresponding to the offset angle.In order nevertheless to obtain stray field compensation or stray fieldreduction, in some examples of the present disclosure the sensor signalsthat are rotated about the offset angle are rotated back through theoffset angle during the signal processing. FIG. 7 shows an example ofthe present disclosure in which the sensor unit 56 is rotated withrespect to the sensor unit 52 by an offset angle, so that the threemagnetic field sensors of the sensor unit 56 detect magnetic fieldcomponents in the xy-direction, yz-direction and z- or zx-direction, asshown in FIG. 7. In the signal processing in the processing device 15 aconversion of the sensor signals then takes place, in order tocompensate for the rotating of the sensor units 52 and 56 relative toeach other, as indicated by a block rot⁻¹ in FIG. 7. In other words, thesensor signals of the two sensor units 44 and 46 are rotated into thesame coordinate system.

In some examples of the present disclosure a magnetic field sensorarrangement can have, for example, the two sensor units 44 and 46 shownin FIG. 4, which each have at least two magnetic field sensors to detectthe magnetic fields in at least two different directions. The processingdevice can then be designed to calculate a first linear combination, forexample, a difference formation, between the sensor signals of themagnetic field sensors of the two magnetic field sensor arrangements 44and 46, which detect magnetic field components in the same firstdirection. If the first linear combination does not uniquely indicate adiscrete positional relationship between the magnet and the magneticfield sensor arrangement, then the processing device can be designed tocalculate a second linear combination, for example, a differenceformation, between the sensor signals of the magnetic field sensors ofthe two magnetic field sensor arrangements 44 and 46, which detectmagnetic field components in a second direction different from the firstdirection, and to infer the position determination based on the resultof the second linear combination.

In some examples of the present disclosure, the magnetic field sensorarrangement has additional sensors, wherein the processing device can bedesigned to calculate further linear combinations, such as differencesbetween sensor signals, in order to implement additional safetymechanisms.

FIG. 5 shows an example of the present disclosure, in which the sensorarrangement has three sensor units 62, 64, 66. Each of the sensor unitscan be a 1D sensor unit, a 2D sensor unit or a 3D sensor unit. In someexamples, each of the sensor units has at least one magnetic fieldsensor which is sensitive in a specific direction, so that the magneticfield sensors each detect magnetic field components in the samedirection. It is assumed that the sensor units 62, 64, 66 each havemagnetic field sensors that are designed to detect a magnetic fieldcomponent which is vertical (y-direction) in the drawing. Thecorresponding magnetic field sensors are arranged side by side, themagnetic field sensor of the sensor unit 64 being arranged between themagnetic field sensors of the sensor units 62 and 66. In examples inwhich the sensor units are 1D sensor units, these have no additionalmagnetic field sensors. In examples in which the sensor units are 2Dsensor units or 3D sensor units, they can have additional magnetic fieldsensors, which are sensitive in the x-direction and/or z-direction.

FIG. 5 shows the magnet 4 in the 3 positions Pos1, Pos2 and Pos3 inturn. The sensor signals of the magnetic field sensors of the sensorunits 62, 64, 66, which detect the vertical magnetic field components,are assumed to be the first sensor signal S1 (sensor unit 62), thesecond sensor signal S2 (sensor unit 64), and the third sensor signal S3(sensor unit 66).

For these sensor signals different linear combinations can becalculated, which produce the results set out below for the respectiveposition Pos1, Pos2 and Pos3. Here, “high” stands in each case for ahigh value of the respective sensor signal, “low” for a low value of therespective sensor signal and “medium” for a mid-range value of therespective sensor signal.

Linear combination S1−S3

-   Pos1: high−(−low)>0-   Pos2: (−medium)−(−medium)=0-   Pos3: (−low)−high<0

Linear combination S1−S2

-   Pos1: high−0>0-   Pos2: (−medium)−high<0-   Pos3: (−low)−0<0

Linear combination S2−S3

-   Pos1: 0−(−low)>0-   Pos2: high−(−medium)>0-   Pos3: 0−high<0

Linear combination S1−2*S2+S3

-   Pos1: high−2*0+(−low)>0-   Pos2: (−medium)−2*high+(−medium)<0-   Pos3: (−low)−2*0+high<0

In general, all three possible differences that are calculated from anygiven pair of electrodes can be used to determine the magnet position.The respective results of the three differences for the differentpositions are located in different regions, so that the positions can beuniquely determined. The last linear combination S1−2*S2+S3, however,does not enable a distinction to be made between the positions Pos1 andPos3. However, this linear combination is still very useful fordetecting the central position Pos2, since compared with the outerpositions Pos1 and Pos2 it has a different sign. All difference signalsare insensitive to stray fields, but the evaluation signal obtained bythe last linear combination is also insensitive to a stray fieldgradient. Therefore, the last linear combination, i.e. S1−2*S2+S3, canbe used to determine the central magnetic position Pos2 uniquely if thislinear combination yields a value<0. If this linear combination yields avalue>0, then this evaluation signal does not uniquely indicate one ofthe different discrete positions Pos1, Pos2 and Pos3. In this case, theprocessing device will calculate a second evaluation signal using one ofthe other linear combinations, i.e. one of the differences S1−S3, S2−S3and S1−S2, in order to determine the magnet position using the secondevaluation signal. For example, the difference S1−S3 provides a gooddifferentiation between the two outer positions and provides a strayfield insensitivity. The linear combination S1−2*S2+S3 provides aperfect distinction between an outer position and the central positionof the magnet and is insensitive to the stray field and its lineargradient. The two signals are redundant in diverse ways and allowcross-checks, which distinguish at least between the central positionand the outer positions, which represents the distinction with the lowersignal difference and is therefore the most important plausibilitycheck.

In accordance with some examples of the present disclosure, the firstlinear combination can be one which enables the unambiguousidentification of some, but certainly not all, of the discretepositional relationships. If a positional relationship exists whichcannot be uniquely determined by means of the first linear combination,the second linear combination is used. The first linear combination canbe one which is insensitive to stray fields and stray field gradients.

Examples of the present disclosure, however, are not limited to threesensor units or magnetic field sensors, but can be extended to a greaternumber of magnetic field sensors or sensor units with correspondingmagnetic field sensors.

In particular, an extension of the idea of the insensitivity to strayfield gradients can be obtained by an arrangement of magnetic fieldsensors in a two-dimensional array. FIG. 8 schematically illustrates anarrangement of four magnetic field sensors 70, 72, 74, 76, which arearranged at the four corners of a rectangle or square, thus in aquadrupole arrangement. The magnetic field lines shown, ellipsoids,represent an estimate of the magnetic flux density for the vertical(perpendicular to the drawing plane) component of the magnetic field,which is illustrated by equipotential lines. In FIG. 8 a magnet (notshown), which generates a magnetic field with these field lines, isarranged above the magnetic field sensor 76. According to FIG. 9, themagnet is arranged between the sensors 74 and 76 and in accordance withFIG. 10, the magnet is arranged centrally over the sensor arrangementwhich has the magnetic field sensors 70 to 76. The magnetic fieldsensors 70 to 76 can, in turn, be part of a 1D sensor Unit, a 2D sensorunit or a 3D sensor unit and may be sensitive to magnetic fieldcomponents in the same direction. The magnetic field sensor 70 suppliesa sensor signal NW, the magnetic field sensor 72 supplies a sensorsignal NE, the magnetic field sensor 74 supplies a sensor signal SW, andthe magnetic field sensor 76 supplies a sensor signal SE.

From the sensor signals NW, NE, SW, SE different linear combinations canbe calculated which can be used to determine the discrete position inwhich the magnet is located. Differences between the sensor signals fromany two of the magnetic field sensors are insensitive to homogeneousstray fields, but not to stray field gradients. Measurement of themagnetic field using the four spaced apart magnetic field sensors 70,72, 74, 76 makes it possible to calculate three differences which can beused to identify at least nine positions inside the square of thepositions of the four magnetic field sensors. Since a difference is notsufficient in order to determine a discrete positional relationshipuniquely, a plurality of differences is therefore calculated, whichtaken together enable a unique determination of the discrete positionalrelationship of the sensor arrangement relative to the magnet.

In some examples of the present disclosure it is possible to calculatemore than two linear combinations, in case even two linear combinationsstill do not indicate an ambiguous positional relationship. Asdescribed, for example, in the example shown in FIGS. 8 to 10, thecombination of three different measurements can yield an unambiguousdetection of at least nine positions in the grid between the fourmagnetic field sensors 70, 72, 74, 76. These positions can be, forexample, top left, center left, bottom left, upper middle, centermiddle, bottom center, top right, right center, and bottom right.

In some examples, the first linear combination can be calculated bycalculating the sums of respectively diametrically opposite magneticfield sensors of four magnetic field sensors and deducting them fromeach other. In the example shown in FIGS. 8 to 10, the first linearcombination can be calculated, for example, as NW−NE−SW+SE. Thiscombination is insensitive to homogeneous stray fields and first-ordergradients. This calculation results in zero for all positions along thecentral cross between the four magnetic field sensors and thus does notallow a unique determination of the position when the magnet is locatedthere. In such a case, one or more other linear combinations between thesensor signals NW, NE, SW and SE are additionally used to determine thediscrete position at which the magnet is located. The other mostsuitable linear combinations can be selected such that they areinsensitive to the direction of interference fields in which the higheststrengths of the stray field are to be expected.

In examples of the present disclosure, each sensor signal of the atleast three sensor signals indicates a magnetic field component in aparticular direction, wherein the processing device is designed tocalculate the first and second signal using at least two sensor signalsthat indicate magnetic field components in the same direction andoriginate from magnetic field sensors of the at least three magneticfield sensors which are arranged with a spatial distance between thesame. The processing device in such examples can be designed tocalculate the first and/or second linear combination as a differencebetween any two of the at least two sensor signals. In some examples,the processing device can be designed to calculate the first and/orsecond linear combination by using more than two sensor signals whichindicate magnetic field components in the same direction and originatefrom magnetic field sensors which are spaced apart from each other.

In some examples, the magnetic field sensor arrangement can have aplurality of sensor units which are spaced from each other, wherein thesensor units can have a 1D sensor unit, a 2D sensor unit or a 3D sensorunit. The processing device can then be designed to use sensor signalsof the sensor units in the calculation of the first, second, andoptionally further linear combinations. The respective linearcombination in this case can be calculated using sensor signals whichindicate magnetic field components in the same direction.

Examples of the present disclosure thus allow a detection of discretepositions of a magnetic field generator relative to a magnetic fieldsensor arrangement, wherein the magnetic field sensor arrangement canhave at least two discrete sensor units, which can provide a redundancyfor functional safety and, at the same time, a reduction of a strayfield sensitivity.

In some examples, the processing device and the magnetic field sensorarrangement are integrated in a device. In some examples the processingdevice can be provided as a separate device, separate from the magneticfield sensor arrangement, and receive the sensor signals from themagnetic field sensor arrangement. The processing device can be designedto output a signal that indicates the discrete position of the magneticfield sensor relative to the magnetic field sensor arrangement. In someexamples, the processing device can be designed additionally to output adiagnostic signal, which is defined using the sensor signals and/orlinear combinations calculated from the sensor signals.

In some examples, the processing device can be implemented by anysuitable circuit structures, such as microprocessor circuits, ASICcircuits, CMOS circuits and the like. In some examples, the processingcircuit can be implemented as a combination of hardware structures andmachine-readable instructions. For example, the processing circuit canhave a computing device, such as a processor, and storage devices, whichstore machine-readable instructions that give rise to the implementationof methods described herein when they are executed by the computingdevice. In some examples, the memory can be implemented by any suitablestorage devices, such as EPROM, EEPROM, Flash-EEPROM, FRAM(ferroelectric RAM), MRAM (magnetoresistive RAM), or phase-change RAM.The memory can be coupled with the computing device or can be integratedin the computing device as part of the same. In some examples, theprocessing device and the magnetic field sensor arrangement can beintegrated in a sensor module.

Depending on the specific implementation requirements, examples of thepresent disclosure can be implemented by means of any combination ofcircuits, hardware and/or machine-readable instructions. Examples of thedevice described herein can have a central processing unit, CPU, amicroprocessor and/or any hardware device which is suitable forexecuting instructions stored on a machine-readable medium. Examples ofthe device can have a machine-readable medium, which storesmachine-readable commands which effect the functionalities describedherein, if they are executed by a processing device. Themachine-readable medium can be implemented by any electronic, magnetic,optical or other physical storage medium, such as EPROM, EEPROM,Flash-EEPROM, FRAM (ferroelectric RAM), MRAM (magnetoresistive RAM), orphase-change RAM. Examples of the present disclosure relate tomachine-readable instructions which, if they are executed by aprocessing device, cause the processing device to effect thefunctionalities as they are described herein.

Although a number of aspects of this disclosure have been described asfeatures in connection with a device, it is clear that such adescription can also be regarded as a description of correspondingmethod features. Although some aspects have been described as featuresin connection with a method, it is clear that such a description canalso be regarded as a description of corresponding features of a deviceor the functionality of a device.

In the foregoing detailed description, different features have sometimesbeen grouped together in examples in order to streamline the disclosure.This aspect of the disclosure should not be interpreted as intendingthat the claimed examples have more features than are expresslyspecified in each claim. Instead, as the following claims show, thesubject matter may be present in fewer than all of the featuresdisclosed in a single example. Consequently, the following claims arehereby incorporated into the detailed description, wherein each claimcan stand as a separate example of its own. While each claim can standas its own separate example, it should be noted that, although dependentclaims in the claims refer back to a specific combination with one ormore other claims, other examples also comprise a combination ofdependent claims with the subject matter of any other dependent claim ora combination of each feature with other dependent or independentclaims. Such combinations are assumed to be comprised, except where itis stated that a specific combination is not intended. It is alsointended that a combination of features of a claim with any otherindependent claim is also included, even if this claim is not directlydependent on the independent claim.

The above-described examples are merely representative of the principlesof the present disclosure. It is important to understand thatmodifications and variations of the arrangements and details that aredescribed are obvious to persons skilled in the art. It is thereforeintended that the disclosure is limited only by the attached claims andnot by the specific details that are set out for the purpose of thedescription and explanation of the examples.

LIST OF REFERENCE SIGNS

-   10 magnetic field generator-   12 magnetic field sensor arrangement-   14 device for position detection-   15 processing device-   16,18, 20 magnetic field sensors-   S1, S2, S3 sensor signals-   40 bar magnet-   42,44, 46 sensor units-   50, 54 sensor signals-   52, 56 sensor units-   58 position signal-   59 diagnostic signal-   62, 64, 66 sensor units-   70, 72, 74, 76 magnetic field sensors

What is claimed is:
 1. A device, comprising: an arrangement of at leastthree magnetic field sensors configured to generate at least threesensor signals in response to a magnetic field generated by a magneticfield generator; and a processing device configured to detect apositional relationship between the magnetic field generator and thearrangement of the at least three magnetic field sensors, whereindifferent discrete positional relationships are generated between thearrangement and the magnetic field generator by a relative movementbetween the arrangement and the magnetic field generator, wherein theprocessing device is configured to: calculate a first signal as a firstlinear combination using a first sensor signal set comprising at leasttwo of the at least three sensor signals, and determine a discretepositional relationship as a location of the arrangement relative to themagnetic field generator based on the first signal, the discretepositional relationship being one of the different discrete positionalrelationships.
 2. The device as claimed in claim 1, wherein theprocessing device is configured to select the discrete positionalrelationship from among the different discrete positional relationshipsbased on the first signal.
 3. The device as claimed in claim 1, whereinthe processing device is further configured to calculate a second signalas a second linear combination using a second sensor signal setcomprising at least two of the at least three sensor signals, at leastone of which differs from the sensor signals used in the first sensorsignal set for the calculation of the first signal, and determine thediscrete positional relationship as the location of the arrangementrelative to the magnetic field generator based on the second signal. 4.The device as claimed in claim 3, wherein the processing device isconfigured to select the discrete positional relationship from among thedifferent discrete positional relationships based on the second signal.5. The device as claimed in claim 3, wherein the processing device isconfigured to select the discrete positional relationship from among thedifferent discrete positional relationships based on the first signaland the second signal.
 6. The device as claimed in claim 3, wherein theprocessing device is configured to use the first signal and the secondsignal in order to determine in which of the different discretepositional relationships the arrangement is located relative to themagnetic field generator.
 7. The device as claimed in claim 1, whereinthe processing device is configured to determine whether the firstsignal uniquely indicates one of the different discrete positionalrelationships, if the first signal uniquely corresponds to one of thedifferent discrete positional relationships, the processing device isconfigured to determine that the arrangement is located at a locationhaving the discrete positional relationship relative to the magneticfield generator that uniquely corresponds to the first signal, and ifthe first signal does not uniquely correspond to one of the differentdiscrete positional relationships, the processing device is configuredto calculate a second signal as a second linear combination using asecond sensor signal set comprising at least two of the at least threesensor signals, at least one of which differs from the sensor signalsused in the first sensor signal set for the calculation of the firstsignal, and to use at least the second signal in order to determine inwhich of the different discrete positional relationships the arrangementis located relative to the magnetic field generator.
 8. The device asclaimed in claim 3, wherein: each sensor signal of the at least threesensor signals indicates a magnetic field component in a particulardirection, wherein the processing device is configured to calculate thefirst signal and the second signal using at least two sensor signalsthat indicate magnetic field components in a same direction andoriginate from magnetic field sensors of the at least three magneticfield sensors, which are arranged with a spatial distance between thesame.
 9. The device as claimed in claim 1, wherein: each sensor signalof the at least three sensor signals indicates a magnetic fieldcomponent in a specific direction, wherein the processing device isconfigured to perform calculations in order to convert sensor signalswhich indicate magnetic field components in directions arranged at anangle to one another into converted sensor signals which indicatemagnetic field components in a same direction.
 10. The device as claimedin claim 9, wherein three converted sensor signals of the convertedsensor signals indicate magnetic field components in the same direction.11. The device as claimed in claim 1, wherein three sensor signals ofthe at least three sensor signals indicate magnetic field components ina same direction.
 12. The device as claimed in claim 11, wherein: thethree sensor signals originate from three magnetic field sensors whichare arranged next to one another, wherein a second magnetic field sensorof the three magnetic field sensors is arranged between a first magneticfield sensor and a third magnetic field sensor of the three magneticfield sensors, wherein the processing circuit is configured to:calculate the first signal according to S−2*S2+S3, where S1 is thesensor signal generated by the first magnetic field sensor, S2 is thesensor signal generated by the second magnetic field sensor and S3 isthe sensor signal generated by the third magnetic field sensor, andcalculate the second signal as a difference between the sensor signalsof the first magnetic field sensor and the second magnetic field sensor,as a difference between the sensor signals of the second magnetic fieldsensor and the third magnetic field sensor, or as a difference betweenthe sensor signals of the first magnetic field sensor and the thirdmagnetic field sensor.
 13. The device as claimed in claim 11, wherein:the arrangement of at least three magnetic field sensors includes atleast four magnetic field sensors, and four sensor signals of the atleast three sensor signals originate from the at least four magneticfield sensors which are arranged in a square arrangement in atwo-dimensional array, wherein the processing device is configured tocalculate the first signal by calculating sums of respectivelydiametrically opposite magnetic field sensors of the at least fourmagnetic field sensors and subtracting the sums from each other.
 14. Thedevice as claimed in claim 13, wherein: the processing device isconfigured to calculate a second signal, a third signal, and a fourthsignal as differences between different pairs of the four sensor signalsand to use the second, the third, and the fourth signals to determine inwhich of the different discrete positional relationships the arrangementis located relative to the magnetic field sensor.
 15. The device asclaimed in claim 11, wherein: the three sensor signals originate fromthree magnetic field sensors which are arranged next to one another,wherein a second magnetic field sensor of the three magnetic fieldsensors is arranged between a first magnetic field sensor and a thirdmagnetic field sensor of the three magnetic field sensors, wherein theprocessing circuit is configured to: calculate the first signalaccording to S1−2*S2+S3, where S1 is the sensor signal generated by thefirst magnetic field sensor, S2 is the sensor signal generated by thesecond magnetic field sensor and S3 is the sensor signal generated bythe third magnetic field sensor, and calculate a second signal as adifference between the sensor signals of the first magnetic field sensorand the second magnetic field sensor, as a difference between the sensorsignals of the second magnetic field sensor and the third magnetic fieldsensor, or as a difference between the sensor signals of the firstmagnetic field sensor and the third magnetic field sensor, and determinethe discrete positional relationship as the location of the arrangementrelative to the magnetic field generator based on the second signal. 16.The device as claimed in claim 1, wherein: the sensor signals of the atleast three sensor signals originate from at least four magnetic fieldsensors, a first two of the at least four magnetic field sensors arearranged with a spatial distance between the same and are configured todetect a magnetic field component in a first direction, and a second twoof the at least four magnetic field sensors are arranged with a spatialdistance between the same and are configured to detect a magnetic fieldcomponent in a second direction different from the first direction. 17.The device as claimed in claim 1, wherein: the at least three sensorsignals originate from at least one first magnetic field sensor which isconfigured to detect a magnetic field component in a first direction,originate from at least one second magnetic field sensor which isconfigured to detect a magnetic field component in a second directiondifferent from the first direction, and originate from a third magneticfield sensor which is configured to detect a magnetic field component ina third direction different from the first and the second directions.18. The device as claimed in claim 1, wherein: the processing device isconfigured to calculate the first linear combination using sensorsignals of the at least three sensor signals which have a lowestsensitivity to a particular stray field among all of the at least threesensor signals.
 19. The device as claimed in claim 3, wherein: theprocessing circuit is configured to use other sensor signals than thesensor signals that were used to calculate the first signal and thesecond signal in order to carry out a plausibility check.
 20. The deviceas claimed in claim 1, wherein the magnetic field generator is formed bya magnet which has exactly one north pole and exactly one south pole.21. A method for detecting a positional relationship between a magneticfield generator and an arrangement of at least three magnetic fieldsensors, wherein by means of a relative movement between the arrangementand the magnetic field generator, different discrete positionalrelationships are generated between the arrangement and the magneticfield generator, the at least three magnetic field sensors beingconfigured to generate at least three sensor signals in response to amagnetic field generated by the magnetic field generator, the methodcomprising: calculating a first signal as a first linear combinationusing a first sensor signal set comprising at least two of the at leastthree sensor signals, and determining a discrete positional relationshipas a location of the arrangement relative to the magnetic fieldgenerator based on the first signal, the discrete positionalrelationship being one of the different discrete positionalrelationships.